package com.sht.product.yuea.customer.service;

import com.sht.product.yuea.customer.dao.ICustomerDao;
import com.sht.product.yuea.customer.entity.Customer;

public class CustomerService implements ICustomerService{
	private ICustomerDao customerDao;

	@Override
	public Customer addCustomer(Customer customerForInsert) {
		customerDao.insert(customerForInsert);
		return customerForInsert;
	}

	@Override
	public Customer modifyCustomer(Customer customerForModify) {
		customerDao.updateByPrimaryKey(customerForModify);
		return customerForModify;
	}
	

	@Override
	public Customer getCustomer(String userOpenID) {
		return customerDao.selectByPrimaryKey(userOpenID);
	}
	
	public ICustomerDao getCustomerDao() {
		return customerDao;
	}

	public void setCustomerDao(ICustomerDao customerDao) {
		this.customerDao = customerDao;
	}

	
}
